//
//  U9MyMessageManager.m
//  U9WatchGame
//
//  Created by myPro on 2020/1/15.
//  Copyright © 2020 UUU9. All rights reserved.
//

#import "U9MyMessageManager.h"
#import "U9MessageCommonModel.h"
@implementation U9MyMessageManager

+(void)getMyMessageCountWithUserid:(NSString *)userid andSession:(NSString *)session andCompletionHandle:(void (^)(U9MessageCommonModel *model, NSError *error))complete{
    NSString *param = [NSString stringWithFormat:@"userid=%@&sessionid=%@",userid,session];
    [self POSTBase64:[NSString stringWithFormat:@"%@%@",Api_URL,kGetUnreaderReply]
              parameters:param
       completionHandler:^(id responseObj, NSError *error) {
           U9MessageCommonModel *model = [U9MessageCommonModel mj_objectWithKeyValues:responseObj];
           if (model.error_code != 0) {
               error = [self createError:model.error_msg];
           }
             complete(model,error);
       }];
}


+(void)setMyMessageCountWithUserid:(NSString *)userid andSession:(NSString *)session andCompletionHandle:(void (^)(U9MessageCommonModel *model, NSError *error))complete{
    NSString *param = [NSString stringWithFormat:@"userid=%@&sessionid=%@",userid,session];
    [self POSTBase64:[NSString stringWithFormat:@"%@%@",Api_URL,kSetDidreaderReply]
              parameters:param
       completionHandler:^(id responseObj, NSError *error) {
           U9MessageCommonModel *model = [U9MessageCommonModel mj_objectWithKeyValues:responseObj];
           if (model.error_code != 0) {
               error = [self createError:model.error_msg];
           }
             complete(model,error);
       }];
}

@end
